pt_path=/home/work_nfs7/yhdai/workspace/online_sys/wenet/examples/onlinesys/exp/final_work_stage7/avg.pt
config_path=/home/work_nfs7/yhdai/workspace/online_sys/wenet/examples/onlinesys/exp/final_work_stage7/train.yaml
dir=./gxl_wer_zoo/aishell_1_2-3gram
mkdir -p $dir
python wenet/bin/export_jit.py \
   --config $config_path \
   --checkpoint $pt_path \
   --output_file $dir/final.zip
zip_path=$dir/final.zip
fst_dir=/home/work_nfs8/xlgeng/new_workspace/gxl_ai_utils/eggs/cats_and_dogs/ngram_task/data/lang_test
echo '耿雪龙： 开始tlg推理'
test_data_dir="/home/work_nfs8/xlgeng/data/scp_test"
test_sets=("aishell" "mix_asru" "aishell2" "speechio_0" "speechio_1" "speechio_2" "speechio_3" "speechio_4" "test_meeting" "test_net")

for test_set in "${test_sets[@]}"; do
{
echo "test this dataset: $test_set"
# test_dir=$dir/001/${test_set}
wav_path=$test_data_dir/$test_set/wav.scp
text_path=$test_data_dir/$test_set/text
# mkdir -p $test_dir
./tools/decode.sh --nj 6 \
    --beam 10.0 --lattice_beam 5 --max_active 7000 --blank_skip_thresh 0.98 \
    --ctc_weight 0.5 --rescoring_weight 1.0 --acoustic_scale 1.2 \
    --fst_path $fst_dir/TLG.fst \
    --dict_path $fst_dir/words.txt \
    $wav_path $text_path $zip_path $fst_dir/units.txt \
    $dir/${test_set}
tail $dir/${test_set}/wer
}
done
wait
